<script setup lang="ts">
import { storeToRefs } from "pinia";
import { testStore } from "@/store/test/index";
// 获取store
const store = testStore();

const { count } = storeToRefs(store);
// 定义新增按钮
const addBtn = () => {
  store.count++;
};
</script>

<template>
  <el-button type="primary" size="default" @click="addBtn">新增</el-button>
  <h3>pinia测试</h3>
  <span>{{ count }}</span>
</template>

<style scoped></style>
